package com.isn.historiaclinica.service;

import java.util.List;

import com.isn.historiaclinica.entity.HistoriaClinica;
import com.isn.historiaclinica.jpa.HistoriaClinicaJPA;

public class HistoriaClinicaServiceImpl implements HistoriaClinicaService{
	HistoriaClinicaJPA hcJPA = new HistoriaClinicaJPA();
	
	@Override
	public List<HistoriaClinica> buscarHC(HistoriaClinica hc) {
		hcJPA.createEM();
		List<HistoriaClinica> listado = hcJPA.buscarHC(hc);
		hcJPA.releaseEM();
		return listado;
	}

	@Override
	public HistoriaClinica obtenerHC(String numHc) {
		hcJPA.createEM();
		HistoriaClinica hc = hcJPA.obtenerHC(numHc);
		hcJPA.releaseEM();
		return hc;
	}

}
